package edu.iyte.ceng316;

import javax.swing.JSplitPane;

import edu.iyte.ceng316.ui.phonebook.left.LeftPanel;
import edu.iyte.ceng316.ui.phonebook.mediator.IPhoneBookMediator;
import edu.iyte.ceng316.ui.phonebook.right.RightSplitPane;



public class MainSplitPane extends JSplitPane {
    LeftPanel lp;
    RightSplitPane rsp;
    IPhoneBookMediator iPhoneBookMediator;
	/**
	 * Create the panel.
	 */
	public MainSplitPane() {
	   lp = new LeftPanel();
       rsp = new RightSplitPane();
       initialize();
	}
	
	public void initialize(){
		setLeftComponent(lp);
		setRightComponent(rsp);
	}
	
	public LeftPanel getLeftPanel() {
		return lp;
	}
	public void setLeftPanel(LeftPanel lp) {
		this.lp = lp;
	}
	public RightSplitPane getRightPanel() {
		return rsp;
	}
	public void setRightPanel(RightSplitPane rsp) {
		this.rsp = rsp;
	}

	public void setIPhoneBookMediator(IPhoneBookMediator iPhoneBookMediator) {
		this.iPhoneBookMediator = iPhoneBookMediator;
		lp.setIPhoneBookMediator(iPhoneBookMediator);
		rsp.setIPhoneBookMediator(iPhoneBookMediator);
	}


}